module.exports = () => {
    const path_ = eval('require')('path');

    let dev = false;
    let basePath = '';
    let appAsar = '';
    if ((process.resourcesPath || '').includes('node_modules')) {
        // src 的上一层目录
        basePath = process.cwd();
        dev = true;
    } else {
        // app.asar 的上一层目录
        basePath = path_.join(process.resourcesPath);
        appAsar = path_.join(process.resourcesPath, 'app.asar');
        dev = false;
    }

    return {
        basePath,
        appAsar,
        dev,
    };
};
